﻿<%@ Page Language="C#" MasterPageFile="~/INFTUR.master" AutoEventWireup="true" CodeBehind="ManterHotel.aspx.cs" Inherits="INFTUR.WebForm1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id = "principal" style ="width:400px" >
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div id = "Consulta" style ="width:400px"> 
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                        AutoGenerateColumns="False" DataSourceID="ObsHotel" 
                        onselectedindexchanged="GridView1_SelectedIndexChanged" 
                        style="margin-top: 14px">
                        <Columns>
                            <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
                            <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
                            <asp:BoundField DataField="Telefone" HeaderText="Telefone" 
                                SortExpression="Telefone" />
                            <asp:BoundField DataField="Site" HeaderText="Site" SortExpression="Site" />
                            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                            <asp:BoundField DataField="Estrelas" HeaderText="Estrelas" 
                                SortExpression="Estrelas" />
                            <asp:TemplateField HeaderText="Atualizar">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LbAtualizar" runat="server" onclick="LbAtualizar_Click">Atualizar</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Delete">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LbDelete" runat="server" onclick="LinkButton1_Click">Delete</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
    
    
    </div>
     <div id ="cadastro" class="divDados" style="width:400px">
     <table>
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="ID"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TbID" runat="server"></asp:TextBox>
&nbsp;&nbsp;
                    <asp:Button ID="BBnovo" runat="server" onclick="BBnovo_Click" Text="Novo Hotel" 
                        Width="79px" />
                    <asp:ObjectDataSource ID="ObsHotel" runat="server" 
                        DataObjectTypeName="Negocios.HotelBO" DeleteMethod="remover" 
                        InsertMethod="inserir" OldValuesParameterFormatString="original_{0}" 
                        SelectMethod="ConsultaTodos" TypeName="Negocios.HotelBOMetodos" 
                        UpdateMethod="atualizar" onselecting="ObsHotel_Selecting">
                        <DeleteParameters>
                            <asp:Parameter Name="id" Type="Int32" />
                        </DeleteParameters>
                    </asp:ObjectDataSource>
                    
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label2" runat="server" Text="Nome"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="Tbnome" runat="server" MaxLength="50"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label6" runat="server" Text="Telefone"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="Tbtelefone" runat="server" MaxLength="12"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label3" runat="server" Text="Site"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="Tbsite" runat="server" MaxLength="50"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label4" runat="server" Text="E-mail"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="Tbemail" runat="server" MaxLength="50"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label5" runat="server" Text="Endereço"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="Tbendereco" runat="server" MaxLength="50"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label7" runat="server" Text="Estrelas"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DDLestrelas" runat="server">
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <asp:Button ID="BBgravar" runat="server" onclick="BBgravar_Click" 
                        Text="Gravar" />
&nbsp;&nbsp;
                    <asp:Button ID="BBcancelar" runat="server" onclick="BBcancelar_Click" 
                        style="margin-left: 0px" Text="Cancelar" Width="76px" />
                </td>
            </tr>
        </table>
    </div>
    
   
    <asp:Label ID="Lberro" runat="server"></asp:Label>
    
    </div>
</asp:Content>